<?php
// 本文档自动生成，仅供测试运行
class CourseAction extends ColorBabyCommonAction
{

	public function index(){
		$code = $_REQUEST['code'] ;
		$id = $_REQUEST['id'] ;
		
		if(empty($id)){
			//默认点击了课程介绍后的查询
			if(empty($code)){			
				// 查询总体数据			
				$this->getCommonQueryPage('kcjs','viewbulletin','_course',0,0);
				//查询子模块信息		
				$this->courseCommonQuery();
				$this->display() ;
			}		
			else{
				//点击了子模块后的查询		
				$this->getCommonQueryPage($code,'viewbulletin','_course',1,0);
				$this->courseCommonQuery();
				$this->display() ;
			}
		}else{
			//点击了查看详情
			$condition['id'] = $id;
			//设置一个标志位
			$this->assign('content_mark','1') ;		
			$this->courseCommonQuery();	
			$this->assign('content_info',$this->CommonSimplequery($condition,'viewbulletin',1));
			$this->display();
		}
		
		
	
	}

	
	public function courseCommonQuery(){
			$tempList = $this->CommonSimplequery($condition,"module",1);		
			$moduleConditon['parentid'] = $tempList[id] ;		
			$moduleConditon['status'] = 1 ;
			$this->assign("submoduleInfo",$this->CommonSimplequery($moduleConditon,"module"));
			$this->getIndexCssStyle("kcjs") ;
	}
	
	public function detail(){
		$this->display() ;
	}

	/**
	 +----------------------------------------------------------
	 * 默认操作
	 +----------------------------------------------------------
	 */
	/*
	 public function index()
	 {
	 $this->display(THINK_PATH.'/Tpl/Autoindex/hello.html');
	 }
	 */
	/**
	 +----------------------------------------------------------
	 * 探针模式
	 +----------------------------------------------------------
	 */
	public function checkEnv()
	{
		load('pointer',THINK_PATH.'/Tpl/Autoindex');//载入探针函数
		$env_table = check_env();//根据当前函数获取当前环境
		echo $env_table;
	}

}
?>